function [x_jpos_mat] = jpos_mat(x)
x_jpos_mat=[(-0.0508).*(3..*cos(x(3)) + sin(x(3))) + x(1),x(1),(-0.2032).* ...
  cos(x(3)) + x(1),(-0.0508).*(3..*cos(x(3)) + sin(x(3))) + x(1), ...
  0.0004.*((-127.).*(3..*cos(x(3)) + sin(x(3)) + 8..*sin(x(3) + x(4) ...
  )) + 2500..*x(1)),0.0004.*((-127.).*(3..*cos(x(3)) + sin(x(3)) +  ...
  8..*(sin(x(3) + x(4)) + sin(x(3) + x(4) + x(5)))) + 2500..*x(1)), ...
  0.0001.*((-1524.).*cos(x(3)) + (-508.).*sin(x(3)) + (-4064.).*sin( ...
  x(3) + x(4)) + (-4064.).*sin(x(3) + x(4) + x(5)) + (-2511.).*sin( ...
  x(3) + x(4) + x(5) + x(6)) + 10000..*x(1)),0.0004.*((-127.).*(3..* ...
  cos(x(3)) + sin(x(3)) + 8..*(sin(x(3) + x(4)) + sin(x(3) + x(4) +  ...
  x(5)))) + 2500..*x(1)),0.0004.*((-127.).*(3..*cos(x(3)) + sin(x(3) ...
  ) + 8..*(sin(x(3) + x(4)) + sin(x(3) + x(4) + x(5)) + (-1.).*sin( ...
  x(3) + x(4) + x(5) + x(6) + (-1.).*x(7)))) + 2500..*x(1)),0.0004.* ...
  ((-127.).*(3..*cos(x(3)) + sin(x(3)) + 8..*(sin(x(3) + x(4)) +  ...
  sin(x(3) + x(4) + x(5)) + (-2.).*cos(0.5.*x(8)).*sin(x(3) + x(4) + ...
   x(5) + x(6) + (-1.).*x(7) + (-0.5).*x(8)))) + 2500..*x(1)), ...
  0.0004.*((-127.).*(3..*cos(x(3)) + cos(x(3) + x(4) + x(5) + x(6) + ...
   (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9)) + sin(x(3)) + 8..*sin(x( ...
  3) + x(4)) + 8..*sin(x(3) + x(4) + x(5)) + (-8.).*sin(x(3) + x(4)  ...
  + x(5) + x(6) + (-1.).*x(7)) + (-8.).*sin(x(3) + x(4) + x(5) + x( ...
  6) + (-1.).*x(7) + (-1.).*x(8)) + (-1.).*sin(x(3) + x(4) + x(5) +  ...
  x(6) + (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9))) + 2500..*x(1)), ...
  0.0004.*(127..*((-3.).*cos(x(3)) + 3..*cos(x(3) + x(4) + x(5) + x( ...
  6) + (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9)) + (-1.).*sin(x(3)) + ...
   (-8.).*sin(x(3) + x(4)) + (-8.).*sin(x(3) + x(4) + x(5)) + 8..* ...
  sin(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7)) + 8..*sin(x(3) + x(4) ...
   + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8)) + sin(x(3) + x(4) + x( ...
  5) + x(6) + (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9))) + 2500..*x( ...
  1)),0.0004.*((-127.).*(3..*cos(x(3)) + sin(x(3)) + 8..*(sin(x(3) + ...
   x(4)) + sin(x(3) + x(4) + x(5)) + (-2.).*cos(0.5.*x(8)).*sin(x(3) ...
   + x(4) + x(5) + x(6) + (-1.).*x(7) + (-0.5).*x(8)))) + 2500..*x( ...
  1));0.0508.*(cos(x(3)) + (-3.).*sin(x(3))) + x(2),x(2),(-0.2032).* ...
  sin(x(3)) + x(2),0.0508.*(cos(x(3)) + (-3.).*sin(x(3))) + x(2), ...
  0.0004.*(127..*(cos(x(3)) + 8..*cos(x(3) + x(4)) + (-3.).*sin(x(3) ...
  )) + 2500..*x(2)),0.0004.*(127..*(cos(x(3)) + 8..*cos(x(3) + x(4)) ...
   + 8..*cos(x(3) + x(4) + x(5)) + (-3.).*sin(x(3))) + 2500..*x(2)), ...
  0.0001.*(508..*cos(x(3)) + 4064..*cos(x(3) + x(4)) + 4064..*cos(x( ...
  3) + x(4) + x(5)) + 2511..*cos(x(3) + x(4) + x(5) + x(6)) + ( ...
  -1524.).*sin(x(3)) + 10000..*x(2)),0.0004.*(127..*(cos(x(3)) +  ...
  8..*cos(x(3) + x(4)) + 8..*cos(x(3) + x(4) + x(5)) + (-3.).*sin(x( ...
  3))) + 2500..*x(2)),0.0004.*(127..*(cos(x(3)) + 8..*cos(x(3) + x( ...
  4)) + 8..*cos(x(3) + x(4) + x(5)) + (-8.).*cos(x(3) + x(4) + x(5)  ...
  + x(6) + (-1.).*x(7)) + (-3.).*sin(x(3))) + 2500..*x(2)),0.0004.*( ...
  127..*(cos(x(3)) + 8..*cos(x(3) + x(4)) + 8..*cos(x(3) + x(4) + x( ...
  5)) + (-8.).*cos(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7)) + (-8.) ...
  .*cos(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8)) + ( ...
  -3.).*sin(x(3))) + 2500..*x(2)),0.0004.*((-127.).*((-1.).*cos(x(3) ...
  ) + (-8.).*cos(x(3) + x(4)) + (-8.).*cos(x(3) + x(4) + x(5)) +  ...
  8..*cos(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7)) + 8..*cos(x(3) +  ...
  x(4) + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8)) + cos(x(3) + x(4)  ...
  + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9)) + 3..* ...
  sin(x(3)) + sin(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7) + (-1.).* ...
  x(8) + (-1.).*x(9))) + 2500..*x(2)),0.0004.*(127..*(cos(x(3)) +  ...
  8..*cos(x(3) + x(4)) + 8..*cos(x(3) + x(4) + x(5)) + (-8.).*cos(x( ...
  3) + x(4) + x(5) + x(6) + (-1.).*x(7)) + (-8.).*cos(x(3) + x(4) +  ...
  x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8)) + (-1.).*cos(x(3) + x(4)  ...
  + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8) + (-1.).*x(9)) + (-3.).* ...
  sin(x(3)) + 3..*sin(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7) + ( ...
  -1.).*x(8) + (-1.).*x(9))) + 2500..*x(2)),0.0004.*(127..*(cos(x(3) ...
  ) + 8..*cos(x(3) + x(4)) + 8..*cos(x(3) + x(4) + x(5)) + (-8.).* ...
  cos(x(3) + x(4) + x(5) + x(6) + (-1.).*x(7)) + (-8.).*cos(x(3) +  ...
  x(4) + x(5) + x(6) + (-1.).*x(7) + (-1.).*x(8)) + (-3.).*sin(x(3)) ...
  ) + 2500..*x(2))];
